home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / HC32.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  131 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Metaware High C/C++ 3.21 32 bit version. Supports Phar Lap's
  12. #               TNT DOS Extender.
  13. #
  14. # $Id: hc32.mk 1.1 1995/02/06 12:49:39 kjb release $
  15. #
  16. #############################################################################
  17.  
  18. # Disable warnings for macros redefined here that were given
  19. # on the command line.
  20. __.SILENT       := $(.SILENT)
  21. .SILENT         := yes
  22.  
  23. # File suffix definitions
  24.    L            := .lib   # Libraries
  25.    E            := .exe   # Executables
  26.    O            := .obj   # Objects
  27.    A            := .asm   # Assembler sources
  28.    P            := .cpp   # C++ sources
  29.  
  30. # Import enivornment variables that we use
  31. TMPDIR := $(ROOTDIR)/tmp
  32. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
  33. .IMPORT .IGNORE : FPU
  34.  
  35. # We use the MSDOS shell at all times
  36.    SHELL        := $(COMSPEC)
  37.    GROUPSHELL   := $(SHELL)
  38.    SHELLFLAGS   := $(SWITCHAR)c
  39.    GROUPFLAGS   := $(SHELLFLAGS)
  40.    SHELLMETAS   := *"?<>
  41.    GROUPSUFFIX  := .bat
  42.    DIRSEPSTR    := \\
  43.    DIVFILE       = $(TMPFILE:s,/,\)
  44.  
  45. # Default commands for compiling, assembling linking and archiving
  46.    CC           := hc386    # C-compiler and flags
  47.    CFLAGS       :=
  48.    AS           := tasm     # Assembler and flags
  49.    ASFLAGS      := /mx /m /D__FLAT__ /i$(SCITECH)\INCLUDE
  50.    LD           := hc386
  51.    LDFLAGS       = $(CFLAGS)
  52.    LIB          := 386lib   # TNT 386|lib Librarian
  53.    LIBFLAGS     := -TC
  54.  
  55. # Optionally turn on debugging information
  56. .IF $(DBG)
  57.    CFLAGS       += -g       # Turn on debugging for C compiler
  58.    ASFLAGS      += /zi      # Turn on debugging for assembler
  59. .END
  60.  
  61. # Optionally turn on optimisations
  62. .IF $(OPT)
  63.    CFLAGS       += -586 -O
  64. .ELSE
  65.    CFLAGS       += -O0
  66. .END
  67.  
  68. # Optionally turn on direct i387 FPU instructions
  69.  
  70. .IF $(FPU)
  71.    CFLAGS       += -DFPU387
  72.    ASFLAGS      += -DFPU387
  73. .END
  74.  
  75. # Optionally compile a shareware version of a product
  76. .IF $(SHW)
  77.    LIB_DIR      := LIBSW
  78.    CFLAGS       += -DSHAREWARE
  79. .ELSE
  80.    LIB_DIR      := LIB
  81. .END
  82.  
  83. # Optionally compile a beta release version of a product
  84. .IF $(BETA)
  85.    CFLAGS       += -DBETA
  86.    ASFLAGS      += -DBETA
  87. .END
  88.  
  89. # DOS extender dependant flags
  90.    USE_TNT      := 1
  91.    DX_CFLAGS    += -DTNT
  92.    DX_ASFLAGS   += -DTNT
  93.    LDFLAGS      += -LH:\TNT\LIB
  94.  
  95. # Place to look for PMODE library files
  96.  
  97. .IF NOT $(MK_PMODE)
  98. PMLIB           := tnt\pmode.lib
  99. .END
  100.  
  101. # Define where to install library files
  102.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\HC32
  103.    LIB_DEST     := $(LIB_BASE)
  104.  
  105. # Definition of $(MAKE) macro for recursive makes.
  106.    MAKE = $(MAKECMD) $(MFLAGS)
  107.  
  108. # Macro to install a library file
  109.    INSTALL      := cp
  110.  
  111. # Implicit generation rules for making object files
  112.    %$O: %.c ; +$(CC) $(CFLAGS) -c $<
  113.    %$O: %$P ; +$(CC) $(CFLAGS) -c $<
  114.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  115.  
  116. # Implicit rule for building a library file using response file
  117.    %$L:      ; +$(LIB) $(LIBFLAGS) $@ @$(mktmp,$*.rsp -R $?)
  118.  
  119. # Implicit rule for building an executable file using response file
  120.    %$E:      ; +$(LD) $(LDFLAGS) -o $@ @$(mktmp $(&:s/\/\\) $(PMLIB) $(EXELIBS) -ldosx32.lib)
  121.  
  122. # DMAKE uses this recipe to remove intermediate targets
  123. .REMOVE :; $(RM) -f $<
  124.  
  125. # Turn warnings back to previous setting.
  126. .SILENT := $(__.SILENT)
  127.  
  128. # We dont use TABS in our makefiles
  129. .NOTABS         := yes
  130.  
  131.